plugins/rink: Let the user disable rink connecting to the internet - #99
plugins/rink: Let the user disable rink connecting to the internet#99Sntx626 wants to merge 5 commits into
Conversation
…internet for initialization
|
I do not know if this fits in the context of this PR, but how about caching the json file? I know currency conversion changes over time but having it cached for a day or two is probably no big deal and would also speed up init + you do not loose currency conversion. I may open another PR if this ever gets merged... |
|
Sorry for the late response, but this PR needs a rebase for me to review it. |
|
I'm interested in this, partially for privacy, but more importantly because (without this PR) you can't do calculations without an active internet connection. I'm happy to rebase it for you, if there's a way I'm able to do that (since I didn't open the PR). |
…internet for initialization
|
Went ahead and rebased it locally so I can use it, see |
|
@aaronjamt In case you still want to see it upstream with proper contribution, feel free to open a PR against https://github.com/Sntx626/anyrun/tree/rink-config-no-internet and I'll waive it through so that it appears in this PR. Thanks for the work! |
|
@aaronjamt Ok, I was under the impression that GH would display you as a co-author for your own PR qq It is merged now into this upstream PR ^^ |
|
@Kirottu This PR has just been rebased and is ready for review. |
Kirottu
left a comment
There was a problem hiding this comment.
Other than that minor problem, this looks good to go.
| #[derive(Deserialize, Debug)] | ||
| struct Config { | ||
| prefix: String, | ||
| pull_currencies: bool, |
There was a problem hiding this comment.
This should have a #[serde(default = ...)] annotation with a reasonable value (true should be a reasonable default, and preserves existing functionality). Otherwise existing configs would break.
This PR adds configuration to the rink plugins so that users can disable pulling current currency conversion upon plugin startup.
This stops the rink plugin from connecting to the internet upon startup, as a result the plugin initializes much faster.
A downside is that rink no longer offers currency conversions.
The feature is opt-in, nothing should change as long as the user doesn't specifically disable the pulling of currencies for rink.